﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Domain.StationDomain;
using Zocono.WCS.Infrastructure.ApllicationDto.WCSTaskDto;
using Zocono.WCS.Infrastructure.ApllicationDto;

namespace Zocono.WCS.Application.AppConfigureManage
{
    public class StationInfoApp
    {
        private readonly IStationInfoService _StationInfoService;
        public StationInfoApp(IStationInfoService stationInfoService)
        {
            _StationInfoService = stationInfoService;
        }

        public async Task<PageDto<StationInfo>> GetPagedStationInfoAsync(QueryStationInfoDto queryStationInfo)
        {
            return await _StationInfoService.GetPagedStationInfoAsync(queryStationInfo);
        }

        /// <summary>
        /// 创建工站信息
        /// </summary>
        /// <param name="stationInfo"></param>
        /// <returns></returns>
        public async Task<bool> CreateStationInfoAsync(StationInfo stationInfo)
        {
            return await _StationInfoService.CreateStationInfoAsync(stationInfo);
        }
        public async Task<bool> ModifyStationInfoAsync(StationInfo stationInfo)
        {
            return await _StationInfoService.ModifyStationInfoAsync(stationInfo);
        }
        public async Task<bool> DeleteStationInfoAsync(List<StationInfo> stationInfoList)
        {
            return await _StationInfoService.DeleteStationInfoAsync(stationInfoList);
        }
        public async Task<List<StationInfo>> GetFilterStationInfoListAsync(string keywork)
        {
            return await _StationInfoService.GetFilterStationInfoListAsync(keywork);
        }
        /// <summary>
        /// 根据ID删除数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<bool> DeleteStationInfoByIdAsync(long id)
        {
            return await _StationInfoService.DeleteStationInfoByIdAsync(id);
        }
        /// <summary>
        /// 根据ID获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<StationInfo> GetStationInfoByIdAsync(long id)
        {
            return await _StationInfoService.GetStationInfoByIdAsync(id);
        }

        public async Task<List<StationInfo>> GetAllStationInfoAsync()
        {
            return await _StationInfoService.GetAllStationInfoAsync();
        }
    }
}
